package com.api;

import java.io.IOException;

public class RuntimeDemo {

    public static void main(String[] args) throws IOException {

        //双击shift

//        单例模式
//        饿汉式单例 懒汉式单例

        Runtime r1 = Runtime.getRuntime();
//        Runtime r2 = Runtime.getRuntime();
//        Runtime r3 = Runtime.getRuntime();
//        Runtime r4 = Runtime.getRuntime();
//
//
//        System.out.println(r1 == r2);
//        System.out.println(r3 == r2);
//        System.out.println(r3 == r4);

//        r1.exec("D:\\QQ\\QQ.exe");

//        r1.gc();
//        正常退出jvm
//        r1.exit(0);

//        System.out.println(r1.maxMemory());
//        System.out.println(r1.totalMemory());
//        System.out.println(r1.freeMemory());
    }
}
